<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Game extends Model
{
    use HasFactory;

    use SoftDeletes;

    protected $fillable = [
        'name', 'status', 'game_start_date', 'company_name', 'address', 'detail'
    ];

    public function matches()
    {
        return $this->gameMatches();
    }

    public function gameMatches()
    {
        return $this->hasMany(GameMatch::class);
    }

    public function users()
    {
        return $this->hasMany(GameSignUser::class);
    }

    public function signUpMembers()
    {
        return $this->hasMany(GameSignUpMember::class);
    }
}
